package com.foton.limiter.construstlimiter.utils;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @Author RenPu
 * @Date 2023/05/19 10:49
 * @Version 1.0
 * @Description: 自定义扑获线程中逃逸出运行异常的信息
 **/

@Slf4j
@Component
public class UncatchException implements Thread.UncaughtExceptionHandler {
    @Override
    public void uncaughtException(Thread thread, Throwable throwable) {
        log.debug("-------------》》》捕获线程异常信息");
        log.debug("Exception message - " + throwable.getMessage());
        log.debug("thread state - " + thread.getState());
    }
}
